package groovy文件操作

class 测试文件是文件还是目录 {

    static void main(String[] args) {
        def File1=new File('D:\\C3D\\Files');
        def File2=new File('D:\\C3D\\Files\\1.txt');
        println "File1? ${File1.isDirectory()}"
        println "File2? ${File2.isFile()}"
    }

}
